import React from 'react'
import Movie from './movie'
import Video from './video'
import ShortVideo from './shortVideo'
import { Tabbar } from 'react-vant';
import { Icon } from 'react-vant';
import { useState } from 'react';
import { FriendsO, HomeO, Search, SettingO } from '@react-vant/icons';
import RouterView from '../router/routerView';
import Header from '../components/header';
import { Route, Switch, NavLink, Link, Redirect } from 'react-router-dom' // 快捷键imbrc
function Home(props) {
  // 1.下react-router-dom@5
  // 在入口文件中将所有的组件用BrowserRouter包起来
  // 在需要用路由得地方写Switch包route
  // const [active, setActive] = useState(0);
  console.log(props.child);
  return (
    <div>
      
  
        <Header></Header>
        <RouterView RouterList={props.child}></RouterView>
       {/* <Route path component={}></Route> */}


      <Tabbar>
        <Tabbar.Item icon={<HomeO />}>
            <NavLink to="/home/movie">电影</NavLink>
        </Tabbar.Item>
        <Tabbar.Item icon={<Search />}>
            <NavLink to="/home/video">视频</NavLink>
        </Tabbar.Item>
        <Tabbar.Item icon={<Search />}>
          <NavLink to="/home/shortVideo">短视频</NavLink>
        </Tabbar.Item>
        <Tabbar.Item icon={<Search />}>
        <NavLink to="/home/small">晓</NavLink>
        </Tabbar.Item>
        <Tabbar.Item icon={<Search />}>
        <NavLink to="/my">我的</NavLink>
        </Tabbar.Item>
      </Tabbar>
    </div>
  )
}

export default Home